
public class BubbleSort {

	public static void main(String[] args) {
		
		int[] array = {1, 12, 3, 7, 5, 4, 10, 12, 20, 6};
		for(int i=0;i<array.length;i++){
			for(int j=array.length-1;j>i+1;j--){
				if(array[j]<array[j-1]){
					int temp = array[j];
					array[j] = array[j-1];
					array[j-1] = temp;
				}
			}
		}
		
	}
}
